workflow: optimize external link checks (#22894)#22896
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
@qiancai This PR has conflicts, I have hold it. |
|
@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
There was a problem hiding this comment.
Code Review
This pull request introduces two Perl scripts, extract-changed-markdown-lines.pl and extract-site-hrefs.pl, to optimize external link checking by extracting link candidates and normalizing relative URLs. It also updates the .lycheeignore configuration. Review feedback highlights that the .lycheeignore file contains unresolved merge conflict markers and duplicate entries that need to be resolved. Additionally, both scripts currently only process HTML href attributes and absolute URLs, missing standard Markdown link syntax, which should be addressed to ensure comprehensive link coverage.
| <<<<<<< HEAD | ||
| https://portal\.azure\.com/.* | ||
| https://.*github.*/%7B%7B%7B%20.tidb_operator_version%20%7D%7D%7D | ||
| ======= | ||
| >>>>>>> 145d861113 (workflow: optimize external link checks (#22894)) | ||
| https://.*github.*/%7B%7B%7B.tidb-operator-version%7D%7D%7D | ||
| https://console\.cloud\.google\.com/.* | ||
| https://portal\.azure\.com/.* |
There was a problem hiding this comment.
The file contains unresolved merge conflict markers (<<<<<<<, =======, >>>>>>>) and duplicate entries. These should be removed to ensure the ignore list is correctly parsed and maintained.
https://portal\.azure\.com/.*
https://.*github.*/%7B%7B%7B%20.tidb_operator_version%20%7D%7D%7D
https://.*github.*/%7B%7B%7B.tidb-operator-version%7D%7D%7D
https://console\.cloud\.google\.com/.*
| next unless defined $content; | ||
|
|
||
| my %seen; | ||
| while ($content =~ /\bhref\s*=\s*(["'])(.*?)\1/gi) { |
There was a problem hiding this comment.
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiancai The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This is an automated cherry-pick of #22894
What is changed, added or deleted? (Required)
This PR optimizes the lychee link-check workflows as follows:
file://internal links.hrefURLs and changed Markdown lines with link candidates.hrefvalues such ashref="/tidbcloud/tidb-cloud-quickstart"into URLs based onDOCS_SITE_BASE_URLbefore checking them.Benefits:
DOCS_SITE_BASE_URL.Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?